<?php
class Admin_PiloteController extends Zend_Controller_Action 
{	
	/**
	 * The default action - show the home page
	 */
	public function indexAction() 
	{
		$this->view->title = "Partie Administration - Pilote";
		$ident = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'))->getIdentity();
    	
    	if($ident)
    	{
    		
    	}
    	else
    	{
              $this->_redirect('/admin/accueil');
        }
	}
	
	public function addAction() {
	$ident = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'))->getIdentity();
    	
    	if($ident)
    	{
    		$form = new Admin_Forms_AjouterPilote();
    		$this->view->form = $form;
    	}
    	else
    	{
              $this->_redirect('/admin/accueil');
        }
		
	}
	
	public function updateAction() {
	$ident = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'))->getIdentity();
    	
    	if($ident)
    	{
    		
    	}
    	else
    	{
              $this->_redirect('/admin/accueil');
        }
		
	}
	
	public function deleteAction() {
	$ident = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'))->getIdentity();
    	
    	if($ident)
    	{
    		
    	}
    	else
    	{
              $this->_redirect('/admin/accueil');
        }
		
	}

}